feat: Remove special cases for error messages#5117
feat: Remove special cases for error messages#5117alexander-alderman-webb wants to merge 3 commits intomajor/3.0from
Conversation
❌ 14 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
sentrivana
left a comment
There was a problem hiding this comment.
In general looks good to me but we should make sure this is what we want because once we release it like this, it'll be tough to change.
How does this work with the old Starlette with the missing __str__? Or did we drop support for it already?
|
Good point regarding the old Starlette version. Their So our fix to add special handling of a To keep both worlds happy we could use
Starlette users would see a more meaningful value since Happy to hear other suggestions as well, especially since it'll be hard to change later. |
|
Hmm so if we detect someone explicitly redefined |
Description
Always stringify exception values using the
safe_str()method.The special-casing of the
messageanddetailattributes resulted in missing detail. Themessageattribute is a legacy from Python 2, and the detail attribute was returned directly because an old version of Starlette did not implement__str__for some exceptions.Issues
Closes #5050
Reminders
tox -e linters.feat:,fix:,ref:,meta:)